package kr.hkit.powerjava.chapter11;

public class Triangle extends Shape {
	public int a;
	public int b;
	public int c;
	
	public Triangle(){}

	public Triangle(int x, int y, int size, int a, int b, int c) {
		super(x, y, size);
		this.a = a;
		this.b = b;
		this.c = c;
	}

	@Override
	public int area() {
		return (a * b);
	}

	@Override
	public int girth() {
		return (a + b + c);
	}

	public int getA() {
		return a;
	}

	public void setA(int a) {
		this.a = a;
	}

	public int getB() {
		return b;
	}

	public void setB(int b) {
		this.b = b;
	}

	public int getC() {
		return c;
	}

	public void setC(int c) {
		this.c = c;
	}

	@Override
	public String toString() {
		return String
				.format("Triangle [a=%s, b=%s, c=%s] Shape [x=%s, y=%s, 크기=%s] 면적=%s, 둘레=%s",
						a, b, c, x, y, size, area(), girth());
	}
}
